package com.wechat.ferry.service.impl;

import com.wechat.ferry.service.WxUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

/**
 * @Author Chuan.Chen
 * @Version 1.0.0
 * @Description
 * @CreateTime 2025/2/24 17:35
 */
@Slf4j
@Service
public class TaskService {

    @Autowired
    private WxUserService wxUserService;


    /**
     * 每天6.30执行
     */
    @Scheduled(cron = "0 30 6 ? * ?")
    public void execBirthDay() {
        wxUserService.execBirthDay();
    }

    /**
     * 每天六点执行
     *
     * @throws Exception
     */
    @Scheduled(cron = "0 0 6 ? * ?")
    public void execGoodMorningMessage() throws Exception {
        wxUserService.execGoodMorningMessage();
    }

    /**
     * 每天八点执行
     *
     * @throws Exception
     */
//    @Scheduled(cron = "0 0 8 ? * ?")
    public void execHotNews() throws Exception {
        wxUserService.execHotNews();
    }
}
